package com.cloud.service.impl;

import com.cloud.dao.ScoreDao;
import com.cloud.dao.impl.ScoreDaoImpl;
import com.cloud.entity.Score;
import com.cloud.service.ScoreService;

import java.util.List;

public class ScoreServiceImpl implements ScoreService {
    private ScoreDao dao = new ScoreDaoImpl();

    @Override
    public List<Score> findMyExamsRecord(int userId) {
        return dao.findMyExamsRecord(userId);
    }

    @Override
    public boolean ifAttended(String userId, String examId) {
        return dao.ifAttended(userId, examId);
    }

    @Override
    public List<Score> findScoreById(int exam_id) {
        return dao.findScoreById(exam_id);
    }

    @Override
    public Long findQualifiedStuNumById(Integer exam_id) {
        return  dao.findQualifiedStuNumById(exam_id);
    }

    @Override
    public List<Score> findStuScoreIsZero() {
        return dao.findStuScoreIsZero();
    }
}
